package gmusic.command;

import gmusic.ma.bo.ArtistMABean;
import gmusic.ma.services.impl.MetalArchivesServicesImpl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class AfficherArtistsMA implements Command {

	// private final static Logger log =
	// Logger.getLogger(AfficherArtistsMA.class);

	public String execute(HttpServletRequest req) throws Exception {

		HttpSession session = req.getSession();
		List<ArtistMABean> artists = MetalArchivesServicesImpl.getInstance()
				.getAllArtists();
		List<String> premieresLettre = MetalArchivesServicesImpl.getInstance()
				.getPremieresLettreArtistes();
		session.setAttribute("artists", artists);
		session.setAttribute("premieresLettre", premieresLettre);

		return "/afficherArtistsMA.jsp";
	}
}
